<?php
require_once(PATH_TO_APP . "/components/databaseconnection/DatabaseConnection.php");
require_once(PATH_TO_APP . "/components/outputhandler/OutputHandler.php");
require_once(PATH_TO_APP . "/components/request/Request.php");
require_once(PATH_TO_APP . "/components/session/Session.php");
require_once(PATH_TO_APP . "/components/languagehandler/LanguageHandler.php");

class SingletonRegistry
{
    
    private $arr_singletons_ = array();
    
    public function __construct()
    {
        $this->arr_singletons_['DatabaseConnection'] = DatabaseConnection::getInstance();
        $this->arr_singletons_['OutputHandler'] = OutputHandler::getInstance();
        $this->arr_singletons_['Request'] = Request::getInstance();
        $this->arr_singletons_['Session'] = Session::getInstance();
        $this->arr_singletons_['LanguageHandler'] = LanguageHandler::getInstance();
    }
	
    public function __destruct(){}
    
    public function getSingleton($object)
    {
        if(isset($this->arr_singletons_[$object]))
            return $this->arr_singletons_[$object];
        return false;
    }

}
?>
